package com.tuanzi.loan.business.service.system;

import java.util.List;

import com.tuanzi.loan.business.entity.system.FunctionalPermissionRelation;
import com.tuanzi.loan.business.entity.system.RelationType;
import com.tuanzi.loan.core.service.BaseAuditService;

/**
 * @author Ray 2017/09/21
 */
public interface FunctionalPermissionRelationService extends
        BaseAuditService<FunctionalPermissionRelation, String> {

    FunctionalPermissionRelation relate(String permissionId, RelationType relationType,
            String relationId);

    void unrelate(String permissionId, RelationType relationType, String relationId);

    List<FunctionalPermissionRelation> batchRelate(List<String> permissionId,
            RelationType relationType, String relationId);

    List<FunctionalPermissionRelation> findAllByRelationId(String relationId);

}